package com.fm.base.json.impl;

import com.fm.base.json.JsonString;
import com.fm.base.lang.DeepCloneable;

public class BasicJsonString implements JsonString {
    String s;

    public BasicJsonString(String s) {
        this.s = s;
    }

    @Override
    public String getString() {
        return s;
    }

    @Override
    public CharSequence getChars() {
        return s;
    }

    @Override
    public ValueType getValueType() {
        return ValueType.STRING;
    }

    @Override
    public BasicJsonString clone() {
        try {
            return (BasicJsonString) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public String toString() {
        return s;
    }
}
